package com.lishui.waterojbackendmodel.model.pojo.dto;

import com.lishui.waterojbackendcommon.contant.MessageConstant;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

@Data
public class UserUpdateDTO implements Serializable {
    /**
     * 用户id
     */
    @NotNull(message = MessageConstant.USERID_IS_NULL)
    private Long id;

    /**
     * 用户昵称
     */
    private String username;

    /**
     * 用户头像
     */
    private String avatarUrl;

    /**
     * 性别
     */
    @Max(value = 1, message = MessageConstant.GENDER_ERROR)
    @Min(value = 0, message = MessageConstant.GENDER_ERROR)
    private Integer gender;

    /**
     * 密码
     */
    @Size(min = 5, max = 15, message = MessageConstant.PASSWORD_LENGTH_ERROR)
    private String userPassword;

    /**
     * 电话
     */
    @Size(max = 11, min = 8, message = MessageConstant.PHONE_FORMAT_ERROR)
    private String phone;

    /**
     * 邮箱
     */
    @Email(message = MessageConstant.EMAIL_FORMAT_ERROR)
    private String email;

    /**
     * 个人简介
     */
    private String profile;
}
